
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 01/29/2011 19:24:00
-- Generated from EDMX file: D:\development\Scoreboard\sources\Model\Entities.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [Scoreboard];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[FK_UserParticipant]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Participants] DROP CONSTRAINT [FK_UserParticipant];
GO
IF OBJECT_ID(N'[dbo].[FK_UserParticipant1]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Participants] DROP CONSTRAINT [FK_UserParticipant1];
GO
IF OBJECT_ID(N'[dbo].[FK_GameParticipant]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Games] DROP CONSTRAINT [FK_GameParticipant];
GO
IF OBJECT_ID(N'[dbo].[FK_GameParticipant1]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Games] DROP CONSTRAINT [FK_GameParticipant1];
GO
IF OBJECT_ID(N'[dbo].[FK_TournamentStage]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Stages] DROP CONSTRAINT [FK_TournamentStage];
GO
IF OBJECT_ID(N'[dbo].[FK_StageGroup]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Groups] DROP CONSTRAINT [FK_StageGroup];
GO
IF OBJECT_ID(N'[dbo].[FK_UserRole_User]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[UserRole] DROP CONSTRAINT [FK_UserRole_User];
GO
IF OBJECT_ID(N'[dbo].[FK_UserRole_Role]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[UserRole] DROP CONSTRAINT [FK_UserRole_Role];
GO
IF OBJECT_ID(N'[dbo].[FK_SubTournamentStage]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Stages] DROP CONSTRAINT [FK_SubTournamentStage];
GO
IF OBJECT_ID(N'[dbo].[FK_StageSubTournament]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[SubTournaments] DROP CONSTRAINT [FK_StageSubTournament];
GO
IF OBJECT_ID(N'[dbo].[FK_TournamentParticipant]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Participants] DROP CONSTRAINT [FK_TournamentParticipant];
GO
IF OBJECT_ID(N'[dbo].[FK_GroupParticipant]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Participants] DROP CONSTRAINT [FK_GroupParticipant];
GO
IF OBJECT_ID(N'[dbo].[FK_GroupGame]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[Games] DROP CONSTRAINT [FK_GroupGame];
GO
IF OBJECT_ID(N'[dbo].[FK_UserPeaceOfNews]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[News] DROP CONSTRAINT [FK_UserPeaceOfNews];
GO
IF OBJECT_ID(N'[dbo].[FK_UserPlaygroundLease]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PlaygroundLeases] DROP CONSTRAINT [FK_UserPlaygroundLease];
GO
IF OBJECT_ID(N'[dbo].[FK_PlaygroundPlaygroundLease]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PlaygroundLeases] DROP CONSTRAINT [FK_PlaygroundPlaygroundLease];
GO
IF OBJECT_ID(N'[dbo].[FK_ParticipantPlaygroundLease]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PlaygroundLeases] DROP CONSTRAINT [FK_ParticipantPlaygroundLease];
GO
IF OBJECT_ID(N'[dbo].[FK_ParticipantPlaygroundLease1]', 'F') IS NOT NULL
    ALTER TABLE [dbo].[PlaygroundLeases] DROP CONSTRAINT [FK_ParticipantPlaygroundLease1];
GO

-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[Users]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Users];
GO
IF OBJECT_ID(N'[dbo].[Participants]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Participants];
GO
IF OBJECT_ID(N'[dbo].[Games]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Games];
GO
IF OBJECT_ID(N'[dbo].[Tournaments]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Tournaments];
GO
IF OBJECT_ID(N'[dbo].[Groups]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Groups];
GO
IF OBJECT_ID(N'[dbo].[Stages]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Stages];
GO
IF OBJECT_ID(N'[dbo].[Roles]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Roles];
GO
IF OBJECT_ID(N'[dbo].[SubTournaments]', 'U') IS NOT NULL
    DROP TABLE [dbo].[SubTournaments];
GO
IF OBJECT_ID(N'[dbo].[Scripts]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Scripts];
GO
IF OBJECT_ID(N'[dbo].[News]', 'U') IS NOT NULL
    DROP TABLE [dbo].[News];
GO
IF OBJECT_ID(N'[dbo].[PlaygroundLeases]', 'U') IS NOT NULL
    DROP TABLE [dbo].[PlaygroundLeases];
GO
IF OBJECT_ID(N'[dbo].[Playgrounds]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Playgrounds];
GO
IF OBJECT_ID(N'[dbo].[Properties]', 'U') IS NOT NULL
    DROP TABLE [dbo].[Properties];
GO
IF OBJECT_ID(N'[dbo].[UserRole]', 'U') IS NOT NULL
    DROP TABLE [dbo].[UserRole];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'Users'
CREATE TABLE [dbo].[Users] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Login] nvarchar(max)  NOT NULL,
    [FriendlyName] nvarchar(max)  NULL,
    [RatingValue] int  NOT NULL,
    [RatingGames] int  NOT NULL,
    [PhotoUrl] nvarchar(max)  NULL,
    [Skype] nvarchar(max)  NULL,
    [Email] nvarchar(max)  NULL,
    [EmployeeId] nvarchar(max)  NULL
);
GO

-- Creating table 'Participants'
CREATE TABLE [dbo].[Participants] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [UserId] int  NOT NULL,
    [UserId1] int  NULL,
    [TournamentId] int  NULL,
    [GroupId] int  NULL
);
GO

-- Creating table 'Games'
CREATE TABLE [dbo].[Games] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [ParticipantScore] float  NOT NULL,
    [OpponentScore] float  NOT NULL,
    [Date] datetime  NOT NULL,
    [ParticipantId] int  NOT NULL,
    [ParticipantId1] int  NOT NULL,
    [GroupId] int  NULL
);
GO

-- Creating table 'Tournaments'
CREATE TABLE [dbo].[Tournaments] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [IsFinished] bit  NOT NULL,
    [DateStarted] datetime  NULL,
    [DateFinished] datetime  NULL,
    [IsForDoubles] bit  NOT NULL,
    [Name] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'Groups'
CREATE TABLE [dbo].[Groups] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [StageId] int  NOT NULL,
    [Tag] nvarchar(max)  NULL,
    [IndexNumber] int  NOT NULL,
    [RoundsNumber] int  NOT NULL
);
GO

-- Creating table 'Stages'
CREATE TABLE [dbo].[Stages] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [TournamentId] int  NULL,
    [IsFinished] bit  NOT NULL,
    [IndexNumber] int  NOT NULL,
    [SubTournamentId] int  NULL
);
GO

-- Creating table 'Roles'
CREATE TABLE [dbo].[Roles] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Name] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'SubTournaments'
CREATE TABLE [dbo].[SubTournaments] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Name] nvarchar(max)  NOT NULL,
    [StageId] int  NOT NULL,
    [IndexNumber] int  NOT NULL
);
GO

-- Creating table 'Scripts'
CREATE TABLE [dbo].[Scripts] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Name] nvarchar(max)  NOT NULL,
    [Text] nvarchar(max)  NOT NULL
);
GO

-- Creating table 'News'
CREATE TABLE [dbo].[News] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Text] nvarchar(max)  NOT NULL,
    [Date] datetime  NOT NULL,
    [UserId] int  NOT NULL
);
GO

-- Creating table 'PlaygroundLeases'
CREATE TABLE [dbo].[PlaygroundLeases] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [StartTime] datetime  NOT NULL,
    [DurationMinutes] int  NOT NULL,
    [UserId] int  NOT NULL,
    [PlaygroundId] int  NOT NULL,
    [ParticipantId] int  NOT NULL,
    [ParticipantId1] int  NOT NULL
);
GO

-- Creating table 'Playgrounds'
CREATE TABLE [dbo].[Playgrounds] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Name] nvarchar(max)  NOT NULL,
    [IsAvailable] bit  NOT NULL,
    [PhotoUrl] nvarchar(max)  NULL,
    [Capacity] int  NOT NULL
);
GO

-- Creating table 'Properties'
CREATE TABLE [dbo].[Properties] (
    [Id] int IDENTITY(1,1) NOT NULL,
    [Key] nvarchar(max)  NOT NULL,
    [Value] nvarchar(max)  NULL
);
GO

-- Creating table 'UserRole'
CREATE TABLE [dbo].[UserRole] (
    [Users_Id] int  NOT NULL,
    [Roles_Id] int  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Id] in table 'Users'
ALTER TABLE [dbo].[Users]
ADD CONSTRAINT [PK_Users]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Participants'
ALTER TABLE [dbo].[Participants]
ADD CONSTRAINT [PK_Participants]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Games'
ALTER TABLE [dbo].[Games]
ADD CONSTRAINT [PK_Games]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Tournaments'
ALTER TABLE [dbo].[Tournaments]
ADD CONSTRAINT [PK_Tournaments]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Groups'
ALTER TABLE [dbo].[Groups]
ADD CONSTRAINT [PK_Groups]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Stages'
ALTER TABLE [dbo].[Stages]
ADD CONSTRAINT [PK_Stages]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Roles'
ALTER TABLE [dbo].[Roles]
ADD CONSTRAINT [PK_Roles]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'SubTournaments'
ALTER TABLE [dbo].[SubTournaments]
ADD CONSTRAINT [PK_SubTournaments]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Scripts'
ALTER TABLE [dbo].[Scripts]
ADD CONSTRAINT [PK_Scripts]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'News'
ALTER TABLE [dbo].[News]
ADD CONSTRAINT [PK_News]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'PlaygroundLeases'
ALTER TABLE [dbo].[PlaygroundLeases]
ADD CONSTRAINT [PK_PlaygroundLeases]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Playgrounds'
ALTER TABLE [dbo].[Playgrounds]
ADD CONSTRAINT [PK_Playgrounds]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Id] in table 'Properties'
ALTER TABLE [dbo].[Properties]
ADD CONSTRAINT [PK_Properties]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- Creating primary key on [Users_Id], [Roles_Id] in table 'UserRole'
ALTER TABLE [dbo].[UserRole]
ADD CONSTRAINT [PK_UserRole]
    PRIMARY KEY NONCLUSTERED ([Users_Id], [Roles_Id] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- Creating foreign key on [UserId] in table 'Participants'
ALTER TABLE [dbo].[Participants]
ADD CONSTRAINT [FK_UserParticipant]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_UserParticipant'
CREATE INDEX [IX_FK_UserParticipant]
ON [dbo].[Participants]
    ([UserId]);
GO

-- Creating foreign key on [UserId1] in table 'Participants'
ALTER TABLE [dbo].[Participants]
ADD CONSTRAINT [FK_UserParticipant1]
    FOREIGN KEY ([UserId1])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_UserParticipant1'
CREATE INDEX [IX_FK_UserParticipant1]
ON [dbo].[Participants]
    ([UserId1]);
GO

-- Creating foreign key on [ParticipantId] in table 'Games'
ALTER TABLE [dbo].[Games]
ADD CONSTRAINT [FK_GameParticipant]
    FOREIGN KEY ([ParticipantId])
    REFERENCES [dbo].[Participants]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_GameParticipant'
CREATE INDEX [IX_FK_GameParticipant]
ON [dbo].[Games]
    ([ParticipantId]);
GO

-- Creating foreign key on [ParticipantId1] in table 'Games'
ALTER TABLE [dbo].[Games]
ADD CONSTRAINT [FK_GameParticipant1]
    FOREIGN KEY ([ParticipantId1])
    REFERENCES [dbo].[Participants]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_GameParticipant1'
CREATE INDEX [IX_FK_GameParticipant1]
ON [dbo].[Games]
    ([ParticipantId1]);
GO

-- Creating foreign key on [TournamentId] in table 'Stages'
ALTER TABLE [dbo].[Stages]
ADD CONSTRAINT [FK_TournamentStage]
    FOREIGN KEY ([TournamentId])
    REFERENCES [dbo].[Tournaments]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_TournamentStage'
CREATE INDEX [IX_FK_TournamentStage]
ON [dbo].[Stages]
    ([TournamentId]);
GO

-- Creating foreign key on [StageId] in table 'Groups'
ALTER TABLE [dbo].[Groups]
ADD CONSTRAINT [FK_StageGroup]
    FOREIGN KEY ([StageId])
    REFERENCES [dbo].[Stages]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_StageGroup'
CREATE INDEX [IX_FK_StageGroup]
ON [dbo].[Groups]
    ([StageId]);
GO

-- Creating foreign key on [Users_Id] in table 'UserRole'
ALTER TABLE [dbo].[UserRole]
ADD CONSTRAINT [FK_UserRole_User]
    FOREIGN KEY ([Users_Id])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO

-- Creating foreign key on [Roles_Id] in table 'UserRole'
ALTER TABLE [dbo].[UserRole]
ADD CONSTRAINT [FK_UserRole_Role]
    FOREIGN KEY ([Roles_Id])
    REFERENCES [dbo].[Roles]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_UserRole_Role'
CREATE INDEX [IX_FK_UserRole_Role]
ON [dbo].[UserRole]
    ([Roles_Id]);
GO

-- Creating foreign key on [SubTournamentId] in table 'Stages'
ALTER TABLE [dbo].[Stages]
ADD CONSTRAINT [FK_SubTournamentStage]
    FOREIGN KEY ([SubTournamentId])
    REFERENCES [dbo].[SubTournaments]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_SubTournamentStage'
CREATE INDEX [IX_FK_SubTournamentStage]
ON [dbo].[Stages]
    ([SubTournamentId]);
GO

-- Creating foreign key on [StageId] in table 'SubTournaments'
ALTER TABLE [dbo].[SubTournaments]
ADD CONSTRAINT [FK_StageSubTournament]
    FOREIGN KEY ([StageId])
    REFERENCES [dbo].[Stages]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_StageSubTournament'
CREATE INDEX [IX_FK_StageSubTournament]
ON [dbo].[SubTournaments]
    ([StageId]);
GO

-- Creating foreign key on [TournamentId] in table 'Participants'
ALTER TABLE [dbo].[Participants]
ADD CONSTRAINT [FK_TournamentParticipant]
    FOREIGN KEY ([TournamentId])
    REFERENCES [dbo].[Tournaments]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_TournamentParticipant'
CREATE INDEX [IX_FK_TournamentParticipant]
ON [dbo].[Participants]
    ([TournamentId]);
GO

-- Creating foreign key on [GroupId] in table 'Participants'
ALTER TABLE [dbo].[Participants]
ADD CONSTRAINT [FK_GroupParticipant]
    FOREIGN KEY ([GroupId])
    REFERENCES [dbo].[Groups]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_GroupParticipant'
CREATE INDEX [IX_FK_GroupParticipant]
ON [dbo].[Participants]
    ([GroupId]);
GO

-- Creating foreign key on [GroupId] in table 'Games'
ALTER TABLE [dbo].[Games]
ADD CONSTRAINT [FK_GroupGame]
    FOREIGN KEY ([GroupId])
    REFERENCES [dbo].[Groups]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_GroupGame'
CREATE INDEX [IX_FK_GroupGame]
ON [dbo].[Games]
    ([GroupId]);
GO

-- Creating foreign key on [UserId] in table 'News'
ALTER TABLE [dbo].[News]
ADD CONSTRAINT [FK_UserPeaceOfNews]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_UserPeaceOfNews'
CREATE INDEX [IX_FK_UserPeaceOfNews]
ON [dbo].[News]
    ([UserId]);
GO

-- Creating foreign key on [UserId] in table 'PlaygroundLeases'
ALTER TABLE [dbo].[PlaygroundLeases]
ADD CONSTRAINT [FK_UserPlaygroundLease]
    FOREIGN KEY ([UserId])
    REFERENCES [dbo].[Users]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_UserPlaygroundLease'
CREATE INDEX [IX_FK_UserPlaygroundLease]
ON [dbo].[PlaygroundLeases]
    ([UserId]);
GO

-- Creating foreign key on [PlaygroundId] in table 'PlaygroundLeases'
ALTER TABLE [dbo].[PlaygroundLeases]
ADD CONSTRAINT [FK_PlaygroundPlaygroundLease]
    FOREIGN KEY ([PlaygroundId])
    REFERENCES [dbo].[Playgrounds]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_PlaygroundPlaygroundLease'
CREATE INDEX [IX_FK_PlaygroundPlaygroundLease]
ON [dbo].[PlaygroundLeases]
    ([PlaygroundId]);
GO

-- Creating foreign key on [ParticipantId] in table 'PlaygroundLeases'
ALTER TABLE [dbo].[PlaygroundLeases]
ADD CONSTRAINT [FK_ParticipantPlaygroundLease]
    FOREIGN KEY ([ParticipantId])
    REFERENCES [dbo].[Participants]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_ParticipantPlaygroundLease'
CREATE INDEX [IX_FK_ParticipantPlaygroundLease]
ON [dbo].[PlaygroundLeases]
    ([ParticipantId]);
GO

-- Creating foreign key on [ParticipantId1] in table 'PlaygroundLeases'
ALTER TABLE [dbo].[PlaygroundLeases]
ADD CONSTRAINT [FK_ParticipantPlaygroundLease1]
    FOREIGN KEY ([ParticipantId1])
    REFERENCES [dbo].[Participants]
        ([Id])
    ON DELETE NO ACTION ON UPDATE NO ACTION;

-- Creating non-clustered index for FOREIGN KEY 'FK_ParticipantPlaygroundLease1'
CREATE INDEX [IX_FK_ParticipantPlaygroundLease1]
ON [dbo].[PlaygroundLeases]
    ([ParticipantId1]);
GO

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------